package cn.lijiajia3515.cairo.auth.modules.serial;

import cn.lijiajia3515.cairo.feign.configuration.ClientFeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 序号生成器
 */
@FeignClient(
	name = "${cairo.feign.client.cairo-auth-service-v1.name:cairo-auth-service-v1}",
	url = "${cairo.feign.client.cairo-auth-service-v1.url:}",
	path = "${cairo.feign.client.cairo-auth-service-v1.path:/api/serial}",
	configuration = ClientFeignConfiguration.class,
	contextId = "authSerialClient", primary = false
)
public interface SerialClient {

	/**
	 * @param client 系统标识
	 * @param id     渠道标识
	 * @return id
	 */
	@GetMapping("/next/{client}/{id}")
	Long next(@PathVariable("client") String client, @PathVariable(name = "id") String id);
}
